#coding:utf-8

from django.forms import ModelForm
from django import forms
from .models import Students

class StudentForm(ModelForm):
    model = Students
    gender = (('male', '男'), ('female', '女'))
    widgets = {
        'name': forms.TextInput(attrs={'class': 'form-control'}),
        'student_id':forms.TextInput(attrs={'class': 'form-control'}),
        'age':forms.IntegerField(),
        'sex':forms.ChoiceField(choices=gender),
        'image':forms.ImageField(),
        'grade':forms.Select(attrs={'class': 'form-control'}),
        }